"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.LogRateDao = void 0;
const DbConfig_1 = require("../../src/config/DbConfig");
const MysqlManager_1 = require("../../src/engine/utils/MysqlManager");
class LogRateDao {
    static getDbName() {
        // if (Config.environment == Config.EnvironmentType.yueyouhui) {
        //     return DbConfig.Db_Name.db_yxx2
        // }
        // else if(Config.environment == Config.EnvironmentType.xj){
        //     return DbConfig.Db_Name.db_yxx2
        // } 
        // else if(Config.environment == Config.EnvironmentType.Jk){
        //     return DbConfig.Db_Name.db_jk
        // }
        // else if(Config.environment == Config.EnvironmentType.chaoyou){
        //     return DbConfig.Db_Name.db_chaoyouhui
        // }
        // else {
        return DbConfig_1.DbConfig.Db_Name.db_yxx;
        // }
    }
    static get_log_rate() {
        return __awaiter(this, void 0, void 0, function* () {
            let client = yield MysqlManager_1.MysqlManager.instance.getDb(this.getDbName());
            let sql = "select  * from  log_rate where rate > 0";
            let sqlParams = [];
            let results = yield client.queryPromise(sql, sqlParams);
            if (results && results.length > 0) {
                return results;
            }
            else {
                return [];
            }
        });
    }
}
exports.LogRateDao = LogRateDao;
